<html>
<head><meta charset="utf-8"><title>uninitialized post · t-release · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/index.html">t-release</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/uninitialized.20post.html">uninitialized post</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="214524969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/uninitialized%20post/near/214524969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/uninitialized.20post.html#214524969">(Oct 26 2020 at 01:51)</a>:</h4>
<p>We're landing another increase in <code>mem::uninitialized</code> UB checking this cycle (1.48) -- see <a href="https://github.com/rust-lang/rust/issues/77970#issuecomment-713403218">https://github.com/rust-lang/rust/issues/77970#issuecomment-713403218</a> for some context -- and I am hoping that we can publish a post on inside rust with both some context around these changes (i.e., code is UB, why it's UB), steps to fixing it (should be cargo update for most people, or a switch to MaybeUninit), and then ideally land and backport a change that updates the asserts to point to that post.</p>
<p>cc <span class="user-mention" data-user-id="307537">@Camelid</span>, you might have interest in writing such a post<br>
cc <span class="user-mention" data-user-id="120791">@RalfJ</span> as well, though I suspect you don't have time to write it up</p>



<a name="214527417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/uninitialized%20post/near/214527417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/uninitialized.20post.html#214527417">(Oct 26 2020 at 02:49)</a>:</h4>
<p>I don't know too much about <code>mem::unitialized</code>/<code>MaybeUninit</code>, so I may not be the right person to write the post, but I'll try to look into it tomorrow :)</p>



<a name="214527500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/uninitialized%20post/near/214527500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/uninitialized.20post.html#214527500">(Oct 26 2020 at 02:50)</a>:</h4>
<p>Thank you for suggesting it though!</p>



<a name="214543701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/uninitialized%20post/near/214543701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/uninitialized.20post.html#214543701">(Oct 26 2020 at 08:09)</a>:</h4>
<p>I am happy to give feedback on such a post but I don't know when I'd have time to write one. But it's still a few weeks until the release so I could try to make some time until then.</p>



<a name="214543796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/uninitialized%20post/near/214543796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/uninitialized.20post.html#214543796">(Oct 26 2020 at 08:10)</a>:</h4>
<p>also see <a href="https://gankra.github.io/blah/initialize-me-maybe/">this old post on <code>MaybeUninit</code></a></p>



<a name="214544029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/uninitialized%20post/near/214544029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/uninitialized.20post.html#214544029">(Oct 26 2020 at 08:13)</a>:</h4>
<p>(also FYI I usually only check Zulip on weekends, so ping me in responses if you need a reply faster than that :) )</p>



<a name="216725692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/uninitialized%20post/near/216725692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/uninitialized.20post.html#216725692">(Nov 14 2020 at 12:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> so what is the timeline here, and what would be the focus of that post? <span class="user-mention" data-user-id="307537">@Camelid</span> did you have some time to look into it? (It doesn't look great for me to find that time; even when I have some time for writing, there are two blog posts I have planned to write for many months now that I'd like to finally get to.)<br>
I think <a href="https://gankra.github.io/blah/initialize-me-maybe/">https://gankra.github.io/blah/initialize-me-maybe/</a> already covers the "switch from mem::uninit to MaybeUninit" part and why it is important. So would this new post be mostly about the fact that we now have more checks and what can happen due to these panics (e.g., destructors running unexpectedly which can lead to double-panics or segfaults)?</p>



<a name="216725759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/uninitialized%20post/near/216725759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/uninitialized.20post.html#216725759">(Nov 14 2020 at 12:13)</a>:</h4>
<p>I think it's probably fine to leave this unwritten for now. I might try to include a piece in main 1.48 blog (maybe somewhat more general, like "increased mitigations for some ub") or draft something for inside rust myself, though the latter I'm doubtful I can find time for.</p>



<a name="216725829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/uninitialized%20post/near/216725829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/uninitialized.20post.html#216725829">(Nov 14 2020 at 12:15)</a>:</h4>
<p>But yeah, I had forgotten about that post, that's a good thing to point at and then explain just a bit more about current progress</p>



<a name="216918166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/uninitialized%20post/near/216918166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/uninitialized.20post.html#216918166">(Nov 16 2020 at 19:18)</a>:</h4>
<p>Yeah, I think I felt that I'm new enough to this stuff that it might be hard to write a good post about it.</p>
<p>Side note: Before I got obsessed with Rust, I mostly used Python – not exactly low-level stuff!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>